from django.db import models
from goods.models import Goods


class CartRe(models.Model):
    """购物车商品推荐"""
    show_status = models.BooleanField(default=True, verbose_name='是否显示')
    goods = models.OneToOneField(Goods, related_name='goods', verbose_name='商品', on_delete=models.CASCADE,
                                 help_text='商品')

    class Meta:
        db_table = 'tb_cartre'
        verbose_name = '购物车商品推荐'
        verbose_name_plural = verbose_name
        ordering = ['id']

    def __str__(self):
        return self.goods.name
